<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>~/itimer/src/iTimer.vhd.html</title>
<meta name="Generator" content="Vim/7.2">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000"><font face="monospace">
<font color="#00008b">----------------------------------------------------------------------------------</font><br>
<font color="#00008b">-- Company: College of Engineering and Architecture</font><br>
<font color="#00008b">--</font><br>
<font color="#00008b">-- Engineers: Elias Medawar (medawar.elias@gmail.com), </font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Robin Franzi (robsoab@gmail.com)</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Yves Peissard (ypeissard@gmail.com)</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simon Nissille (simon.nissille@edu.hefr.ch), </font><br>
<font color="#00008b">-- </font><br>
<font color="#00008b">-- Create Date:&nbsp;&nbsp;&nbsp;&nbsp;15:49:27 26/05/2009 </font><br>
<font color="#00008b">-- Design Name: </font><br>
<font color="#00008b">-- Module Name:&nbsp;&nbsp;&nbsp;&nbsp;iTmer - Behavioral </font><br>
<font color="#00008b">-- Project Name:&nbsp;&nbsp; iTimer</font><br>
<font color="#00008b">-- Target Devices: Spartan2</font><br>
<font color="#00008b">-- Description:&nbsp;&nbsp;&nbsp;&nbsp;This is the main file of the iTimer project.</font><br>
<font color="#00008b">--</font><br>
<font color="#00008b">--</font><br>
<font color="#00008b">-- Dependencies:&nbsp;&nbsp; buttonHandler.vhd</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; displayTime.vhd</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modeSwitcher.vhd</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TPU.vhd (Time Processing Unit)</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; waitedTime.vhd</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wheelHandler.vhd</font><br>
<font color="#00008b">--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><br>
<font color="#00008b">--</font><br>
<font color="#00008b">----------------------------------------------------------------------------------</font><br>
<font color="#a52a2a"><b>library</b></font>&nbsp;IEEE<font color="#6a5acd">;</font><br>
<font color="#a52a2a"><b>use</b></font>&nbsp;IEEE<font color="#6a5acd">.</font>STD_LOGIC_1164<font color="#6a5acd">.</font><font color="#a52a2a"><b>ALL</b></font><font color="#6a5acd">;</font><br>
<font color="#a52a2a"><b>use</b></font>&nbsp;IEEE<font color="#6a5acd">.</font>STD_LOGIC_ARITH<font color="#6a5acd">.</font><font color="#a52a2a"><b>ALL</b></font><font color="#6a5acd">;</font><br>
<font color="#a52a2a"><b>use</b></font>&nbsp;IEEE<font color="#6a5acd">.</font>STD_LOGIC_UNSIGNED<font color="#6a5acd">.</font><font color="#a52a2a"><b>ALL</b></font><font color="#6a5acd">;</font><br>
<br>
<font color="#a52a2a"><b>entity</b></font>&nbsp;iTmer <font color="#a52a2a"><b>is</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>Port</b></font>&nbsp;<font color="#6a5acd">(</font>&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clockInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>in</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC</b></font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">'0'</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buttonInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>in</b></font>&nbsp;<font color="#2e8b57"><b>STD_LOGIC</b></font>&nbsp;<font color="#2e8b57"><b>:=</b></font>&nbsp;<font color="#ff00ff">'0'</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wheelInputA <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>in</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC</b></font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">'0'</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wheelInputB <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>in</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC</b></font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">'0'</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alarm <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>out</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC</b></font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">'0'</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; segmentMinute0 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>out</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC_VECTOR</b></font>&nbsp;<font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">&quot;0000&quot;</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; segmentMinute1 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>out</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC_VECTOR</b></font>&nbsp;<font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">&quot;0000&quot;</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; segmentSeconde0 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>out</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC_VECTOR</b></font>&nbsp;<font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">&quot;0000&quot;</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; segmentSeconde1 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>out</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC_VECTOR</b></font>&nbsp;<font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">&quot;0000&quot;</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modeTemSwitcher<font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>out</b></font>&nbsp;<font color="#2e8b57"><b>STD_LOGIC_VECTOR</b></font>&nbsp;<font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">&quot;00&quot;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
<font color="#a52a2a"><b>end</b></font>&nbsp;iTmer<font color="#6a5acd">;</font><br>
<br>
<font color="#a52a2a"><b>architecture</b></font>&nbsp;Behavioral <font color="#a52a2a"><b>of</b></font>&nbsp;iTmer <font color="#a52a2a"><b>is</b></font><br>
<font color="#00008b">-- wheelHandler Signals</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>SIGNAL</b></font>&nbsp;busDecrement<font color="#6a5acd">,</font>busIncrement<font color="#6a5acd">,</font>busMode <font color="#2e8b57"><b>:</b></font>&nbsp;&nbsp;<font color="#2e8b57"><b>STD_LOGIC_VECTOR</b></font>&nbsp;<font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">&quot;00&quot;</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>SIGNAL</b></font>&nbsp;alarmInteren<font color="#6a5acd">,</font>simplePush<font color="#6a5acd">,</font>longPush <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font>&nbsp;<font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">'0'</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>SIGNAL</b></font>&nbsp;busTime <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#2e8b57"><b>STD_LOGIC_VECTOR</b></font>&nbsp;<font color="#6a5acd">(</font><font color="#ff00ff">12</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><font color="#2e8b57"><b>:=</b></font><font color="#ff00ff">&quot;0000000000000&quot;</font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font>&nbsp;buttonHandler<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>PORT</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buttonInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;simplePush <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;longPush <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>END</b></font>&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font>&nbsp;wheelHandler<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>PORT</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wheelInputA <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wheelInputB <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busDecrement <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busIncrement <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>END</b></font>&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font>&nbsp;modeSwitcher<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>PORT</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alarm <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;simplePush <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;longPush <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>END</b></font>&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font>&nbsp;timeProcessingUnit<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>PORT</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busDecrement <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busIncrement <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busTime <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">12</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alarmSignal <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>END</b></font>&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font>&nbsp;displayTime<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>PORT</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busTimer <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">12</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic</b></font><font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>IN</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">1</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment1 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment2 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment3 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment4 <font color="#2e8b57"><b>:</b></font>&nbsp;<font color="#a52a2a"><b>OUT</b></font>&nbsp;<font color="#2e8b57"><b>std_logic_vector</b></font><font color="#6a5acd">(</font><font color="#ff00ff">3</font>&nbsp;<font color="#a52a2a"><b>downto</b></font>&nbsp;<font color="#ff00ff">0</font><font color="#6a5acd">)</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>END</b></font>&nbsp;<font color="#a52a2a"><b>COMPONENT</b></font><font color="#6a5acd">;</font><br>
<font color="#a52a2a"><b>begin</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00008b">-- Der Component buttonHandler</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;Inst_buttonHandler<font color="#2e8b57"><b>:</b></font>&nbsp;buttonHandler <font color="#a52a2a"><b>PORT</b></font>&nbsp;<font color="#a52a2a"><b>MAP</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buttonInput <font color="#2e8b57"><b>=&gt;</b></font>buttonInput <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>=&gt;</b></font>clockInput <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;simplePush <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;simplePush<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;longPush <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;longPush<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00008b">-- Der Component wheelHandler</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;Inst_wheelHandler<font color="#2e8b57"><b>:</b></font>&nbsp;wheelHandler <font color="#a52a2a"><b>PORT</b></font>&nbsp;<font color="#a52a2a"><b>MAP</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wheelInputA <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;wheelInputA<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wheelInputB <font color="#2e8b57"><b>=&gt;</b></font>wheelInputB <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;clockInput<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;busMode<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busDecrement <font color="#2e8b57"><b>=&gt;</b></font>busIncrement <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busIncrement <font color="#2e8b57"><b>=&gt;</b></font>busDecrement <br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00008b">-- Der Component modeSwitcher</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;Inst_modeSwitcher<font color="#2e8b57"><b>:</b></font>&nbsp;modeSwitcher <font color="#a52a2a"><b>PORT</b></font>&nbsp;<font color="#a52a2a"><b>MAP</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;busMode<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alarm <font color="#2e8b57"><b>=&gt;</b></font>alarmInteren <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;simplePush <font color="#2e8b57"><b>=&gt;</b></font>simplePush <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;longPush <font color="#2e8b57"><b>=&gt;</b></font>longPush <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>=&gt;</b></font>clockInput <br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00008b">-- Der Component timeProcessingUnit</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;Inst_timeProcessingUnit<font color="#2e8b57"><b>:</b></font>&nbsp;timeProcessingUnit <font color="#a52a2a"><b>PORT</b></font>&nbsp;<font color="#a52a2a"><b>MAP</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;clockInput<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>=&gt;</b></font>busMode <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busDecrement <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;busDecrement<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busIncrement <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;busIncrement<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busTime <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;busTime<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alarmSignal <font color="#2e8b57"><b>=&gt;</b></font>alarmInteren <br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00008b">-- Der Component displayTime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><br>
&nbsp;&nbsp;&nbsp;&nbsp;Inst_displayTime<font color="#2e8b57"><b>:</b></font>&nbsp;displayTime <font color="#a52a2a"><b>PORT</b></font>&nbsp;<font color="#a52a2a"><b>MAP</b></font><font color="#6a5acd">(</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busTimer <font color="#2e8b57"><b>=&gt;</b></font>busTime <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clockInput <font color="#2e8b57"><b>=&gt;</b></font>clockInput <font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busMode <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;busMode<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment1 <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;segmentMinute0<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment2 <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;segmentMinute1<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment3 <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;segmentSeconde0<font color="#6a5acd">,</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment4 <font color="#2e8b57"><b>=&gt;</b></font>&nbsp;segmentSeconde1 <br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#6a5acd">);</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;UpdateOutPut<font color="#2e8b57"><b>:</b></font><font color="#a52a2a"><b>PROCESS</b></font><font color="#6a5acd">(</font>clockInput<font color="#6a5acd">)</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>BEGIN</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>IF</b></font>&nbsp;rising_edge<font color="#6a5acd">(</font>clockInput<font color="#6a5acd">)</font>&nbsp;<font color="#a52a2a"><b>THEN</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alarm <font color="#2e8b57"><b>&lt;=</b></font>&nbsp;alarmInteren<font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modeTemSwitcher<font color="#2e8b57"><b>&lt;=</b></font>&nbsp;busMode<font color="#6a5acd">;</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>END</b></font>&nbsp;<font color="#a52a2a"><b>IF</b></font><font color="#6a5acd">;</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#a52a2a"><b>END</b></font>&nbsp;<font color="#a52a2a"><b>PROCESS</b></font><font color="#6a5acd">;</font><br>
<br>
<font color="#a52a2a"><b>end</b></font>&nbsp;Behavioral<font color="#6a5acd">;</font><br>
<br>
</font></body>
</html>
